package com.robot.controller;

import com.robot.dao.dto.EnterpriseDTO;
import com.robot.common.result.Response;
import com.robot.service.EnterpriseService;
import com.robot.dao.vo.EnterpriseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/enterprise")
@Slf4j
@Api(tags = "企业相关接口")
public class EnterpriseController {

    @Autowired
    private EnterpriseService enterpriseService;

    @PostMapping("/create")
    @ApiOperation("新建企业")
    public Response<EnterpriseVO> create(@RequestBody EnterpriseDTO enterpriseDTO){
        EnterpriseVO enterpriseVO = enterpriseService.create(enterpriseDTO);
        return Response.success(enterpriseVO);
    }


}
